import {Vue, Component} from "vue-property-decorator";

@Component({
    components: {}
})
export default class EventConfig extends Vue {
    toEvent(key: string, event: any) {
        uni.$on(key, event);
        uni.$once("hook:beforeDestroy", () => {
            uni.$off(key, event);
        });
    }

}